package cn.com.shadowless.xinning.api;

import cn.com.shadowless.xinning.model.RequestResult;
import cn.com.shadowless.xinning.model.bill.BillCountInfo;
import cn.com.shadowless.xinning.model.bill.BillListInfo;
import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Query;

/**
 * The interface Bill inter face.
 *
 * @author sHadowLess
 */
public interface Bill {

    /**
     * Bill info observable.
     *
     * @param userName the user name
     * @param head     the head
     * @return the observable
     */
    @GET("api/Signed/GetBillCountByAccount")
    Observable<RequestResult<BillCountInfo>> billInfo(
            @Query("account") String userName,
            @Header("Account") String head
    );

    /**
     * Gets bill list by account info.
     *
     * @param orderNo the order no
     * @param head    the head
     * @return the bill list by account info
     */
    @GET("api/Signed/GetBillListByAccount")
    Observable<RequestResult<BillListInfo>> billListInfo(
            @Query("account") String orderNo,
            @Header("Account") String head
    );
}
